import { lazy } from "react"

const routes = [
    {
        path: '/login',
        component: lazy(() => import('../views/login/login'))
    },
    {
        path: '/registry',
        component: lazy(() => import('../views/registry/registry'))
    },
    {
        path: '/index',
        component: lazy(() => import('../views/index')),
        children: [
            {
                path: '/index/home',
                component: lazy(() => import('../views/home/index/index')),
            },
            {
                path: '/index/shop',
                component: lazy(() => import('../views/home/shop/Shop')),
            },
            {
                path: '/index/manger',
                component: lazy(() => import('../views/home/manger/Manger')),
            },
            {
                path: '/index',
                to: '/index/home',
            },
        ]
    },
    {
        path: '/',
        to: "/index"
    },
]

export default routes